
<div id="toplinks">

<?php 
	include 'conexion.php';

	$sql = "SELECT SELECT [id]
      ,[id_modulo]
      ,[nombre]
      ,[descripcion]
      ,[visible]
        FROM [dbo].[pantalla]";
		$r_mod = sqlsrv_query($link,$sql) or die('Consulta fallida: 1 ');
		while($ren_mod = sqlsrv_fetch_array($r_mod)){
			
			$sql_p = "SELECT [id]
      ,[id_usuario]
      ,[id_pantalla]
  FROM [dbo].[privilegios_usuario]
		 	WHERE [id_usuario] like '$uid' AND [id_pantalla] like '$ren_mod[id]'";
			$r_priv = sqlsrv_query($link,$sql_p) or die('Consulta fallida: 2 ');
			if ((sqlsrv_num_rows($r_priv) > 0) || ($tipo==0)){//==0 para ver todo
			if ($ren_mod[visible]==1)
			echo "<a href=\"index.php?p=$ren_mod[id]\" class=\"".tab_select($ren_mod[id])."\">$ren_mod[nombre]</a>";
			}
		}

?>

	</div>

<div id="encabezado">
<div id="title"><b><i>SDS</i> PORTAL</b>
<!-- 
&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/logo_min.png" border="0" alt="SDS">
-->
</div> 
<div id="subtitle"><b><?php echo titulador();?></b></div> 
 <div id="title_info">
<b><?php echo date(' d / m / Y ');?></b>
</div> 
</div>